/*
 * Query.scala
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package org.squela

class Query {

    var queryType: QueryType = null
    var resource: Resource = null
    var whereAssociations: LogicalLink  = null
    var groupByFields: Seq[Field[_]] = null
    var orderByFields: Seq[Field[_]] = null

    def where(logicalLink: LogicalLink): Query = {whereAssociations = logicalLink; this}
    def groupBy(fields: Field[_]*): Query = {groupByFields = fields; this}
    def orderBy(fields: Field[_]*): Query = {groupByFields = fields; this}
}
